package org.dromara.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.system.domain.SysOperLog;
import org.dromara.system.domain.vo.SysOperLogVo;

import java.util.List;
import java.util.Map;

/**
 * 操作日志 数据层
 *
 * @author Lion Li
 */
public interface SysOperLogMapper extends BaseMapperPlus<SysOperLog, SysOperLogVo> {
    @Select("SELECT title, COUNT(*) as count FROM sys_oper_log ${ew.customSqlSegment} GROUP BY title")
    List<Map<String, Object>> selectCountByTitle(@Param("ew") LambdaQueryWrapper<SysOperLog> wrapper);

}
